package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.SaleList;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author dxt
 * @create 2025-07-17-16:08
 */
public interface SaleListDao {

    /**
     * 添加销售单
     * @param saleList
     */
    void saveSaleList(@Param("saleList") SaleList saleList);

    /**
     * 查询销售单
     * @param saleNumber 单号
     * @param customerId 客户ID
     * @param state 付款状态
     * @param sTime 开始时间
     * @param eTime 结束时间
     * @return
     */
    List<SaleList> getSaleList(@Param("saleNumber") String saleNumber, @Param("customerId") Integer customerId, @Param("state") Integer state, @Param("sTime") String sTime, @Param("eTime") String eTime);

    /**
     * 删除销售单
     * @param saleListId
     */
    void deleteSaleListById(Integer saleListId);

    /**
     * 修改销售单付款状态
     * @param saleListId 销售单ID
     * @return
     */
    void updateState(@Param("saleListId") Integer saleListId);

    List<SaleList> getSaleListByTime(@Param("sTime") String sTime, @Param("eTime") String eTime);

    List<String> getSaleDateByDay(@Param("sTime") String sTime, @Param("eTime") String eTime);
}
